# Maintainer: Dekedro <dekedro@protonmail.com>
pkgname=gnu-apl
pkgver=1.8
pkgrel=1
pkgdesc="GNU interpreter for the programming language APL"
url="https://www.gnu.org/software/apl/"
arch="all !ppc64le" # Fails to build
license="GPL-3.0-or-later"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://ftp.gnu.org/gnu/apl/apl-$pkgver.tar.gz"
builddir="$srcdir/apl-$pkgver"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure CXX_WERROR='no' \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
7b903f2d280bba85fd4efb7c5f26e969930c34fdf4667b93adc445521b2eb19cba54f602d823ed56d31d6d596ffce29479c870a110a41f91aa5b7e1747000b54  gnu-apl-1.8.tar.gz
"
